package com.shkg.opencloud.fastdfs.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * <pre>
 *
 * </pre>
 *
 * @author: caipeng
 * @date: 2019/9/4
 * @time: 14:50
 * @version:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ocbase_uploadfile_info")
public class UploadFile extends Model<UploadFile> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;


    @TableField("files_name")
    private String filesName;

    @TableField("files_path")
    private String filesPath;

//    @TableField("files_url")
//    private String filesUrl;

    @TableField("files_type")
    private String filesType;

    @TableField("files_size")
    private Long fileSize;

    @TableField("files_md5")
    private String filesMD5;

    @TableField("foreign_key")
    private String foreignKey;

    /**
     * 上传时间
     */
    @TableField(value = "upload_time", fill = FieldFill.INSERT)
    private Date uploadTime;

    /**
     * 是否已删除：0：否，1：是
     */
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
